function generateRandomArray(length) {
    const arr = [];
    for (let i = 0; i < length; i++) {
        arr.push(Math.floor(Math.random() * 1000));
    }
    return arr;
}

function generateLinearArray(arr) {
    let randomScope = Math.random() * 20 + 1;
    return arr.map(x => x * randomScope + Math.random() * 10)
}

function paramsGenerator() {
    let rand = Math.floor(Math.random() * 10) + 1
    let x = generateRandomArray(rand)
    return {
        "x": x,
        "y": generateLinearArray(x),
        "xi": Math.floor(Math.random() * 100)
    }
}

export default {
    paramsGenerator
}